// import Vue from 'vue';
// import Router from 'vue-router';
// import HelloWorld from '@/components/HelloWorld';

// Vue.use(Router);

// export default new Router({
//   routes: [
//     {
//       path: '/',
//       name: 'HelloWorld',
//       component: HelloWorld,
//     },
//   ],
// });
import VueRouter from 'vue-router';
import goods from '@/components/goods/goods';
import ratings from '@/components/ratings/ratings';
import seller from '@/components/seller/seller';
/* eslint-disable no-new */

// 1. 定义（路由）组件。
// 可以从其他文件 import 进来
/*const goods = {template: '<div class="goods"></div>'};
const ratings = {template: '<div class="ratings"></div>'};*/
// 2. 定义路由
const routes = [
  {path: '/goods',component: goods},
  {path: '/ratings',component: ratings},
  {path: '/seller',component: seller},
];
// 3. 创建 router 实例，然后传 `routes` 配置
const router = new VueRouter({
  routes,
  linkActiveClass:'active'
});

export default router;
